//
//  DJDetailProgramTableViewCell.m
//  CoolFM
//
//  Created by 曹曹 on 16/9/5.
//  Copyright © 2016年 曹曹. All rights reserved.
//

#import "DJDetailProgramTableViewCell.h"
#import "DJProgramRecords.h"
#import "NSString+ListenNums.h"
#import "NSString+TimeDifference.h"

@interface DJDetailProgramTableViewCell ()

// record_title
@property (weak, nonatomic) IBOutlet UILabel *record_title;
// record_play_name
@property (weak, nonatomic) IBOutlet UILabel *record_play_name;
// user_acount
@property (weak, nonatomic) IBOutlet UILabel *user_acount;
// record_file_duration
@property (weak, nonatomic) IBOutlet UILabel *record_file_duration;
// record_created_at
@property (weak, nonatomic) IBOutlet UILabel *record_created_at;

@end

@implementation DJDetailProgramTableViewCell

- (void)setRecords:(DJProgramRecords *)records {
    _records = records;
    _record_title.text = records.record_title;
    _record_play_name.text = records.record_play_name;
    _user_acount.text = [NSString stringWithFormat:@"%@", [NSString listenNumStringWithInteger:records.user_acount]];
    _record_file_duration.text = records.record_file_duration;
    _record_created_at.text = [records.record_created_at timeDifferenceFromeNow] ;
}

- (void)awakeFromNib {
    [super awakeFromNib];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
